unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, KaZip;

type
  TForm1 = class(TForm)
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }

    KZip: TKAZip;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  KZip := TKaZip.Create(Application);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  FreeAndNil(KZip);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  //KZip:= TKAZip.Create(Application);
  KZip.FileName := 'c:\teste'+ FormatDateTime('yyyymmddhhmmss', now) + '.zip';
  KZip.CreateZip(KZip.FileName);
  KZip.Open(KZip.FileName);
  KZip.Comment.Add( 'Copiado pelo FBCopy' );
  KZip.AddFile('c:\DBPROGED.FDB.FBK');
  KZip.Close;
  //FreeAndNil(KZip);
end;

end.
